import java.util.List;

public class ClassEntityBlock extends EntityBlock {

	private Modifier modifier;
	private ClassEntityBlock superClassPointer;
	private List<EntityBlock> fieldMethodList;
	private SimpleNode type;

	public ClassEntityBlock() {
		modifier = new Modifier();
		//visibility="package";
		// TODO change this to any of public/private/static. but how? 
	}

	public Modifier getModifier(Modifier modifier) {
		return modifier;
	}

	public void setModifier(Modifier modifier) {
		this.modifier = modifier;
	}

	public ClassEntityBlock getSuperClassPointer() {
		return superClassPointer;
	}

	public void setSuperClassPointer(ClassEntityBlock superClassPointer) {
		this.superClassPointer = superClassPointer;
	}

	public List<EntityBlock> getFieldMethodList() {
		return fieldMethodList;
	}

	public void setFieldMethodList(List<EntityBlock> fieldMethodList) {
		this.fieldMethodList = fieldMethodList;
	}

	public void print(String prefix) {
		System.out.print("\n Class_Declaration (Name : " + nameBlock.getName());
		if(superClassPointer != null) {
			System.out.print(", Super Class : " + superClassPointer.getNameBlock().getName());
		}
		System.out.println(")");
		
		super.print(prefix);
		/*if (superClassPointer != null) {
			superClassPointer.print(prefix + " ");
		}*/
		if (fieldMethodList != null) {
			for (EntityBlock fieldMethod : fieldMethodList) {
				fieldMethod.print(prefix + " ");
			}
		}
	}

	public SimpleNode getType() {
		return type;
	}

	public void setType(SimpleNode type) {
		this.type = type;
	}
}
